package com.ac.scum.log.web.model.ftp.mapper;

import com.ac.scum.log.bean.ServerFTPLogLogin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;

@Mapper
public interface ServerFTPLogLoginMapper extends BaseMapper<ServerFTPLogLogin> {

    @Select("select count(DISTINCT player_id) from server_ftp_file_log_login where server_id = #{serverId} and server_time>#{startTime} and server_time < #{endTime} and action = 1")
    Integer countLoginCountByDate(@Param("serverId") Long serverId, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
